﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Usuario>" %>
<%@ Import Namespace="TogheterWeBuyIt.Models"%>

<table align="center" width="96%" cellpadding="3" cellspacing="3" style="margin-left:15px;">
<tr><td align="center" colspan="3">Promoções que participo</td></tr>
         <tr>
                    <th style="text-align:center">
                        Promoção
                    </th>        
                    <th style="text-align:center">
                        Pessoas participando
                    </th>    
                    <th style="text-align:center">
                        Criador
                    </th>
                </tr>
            <%
            foreach (var item in Model.ParticipaPromocaos)
            {
       %>
                <tr>
                    <td align="center">
                        <%= Html.ActionLink(item.Promocao.Descricao, "Details", "Promocao", new { id = item.Promocao.Id }, null)%>
                    </td>
                    <td align="center">
                           <%= Html.Label(item.Promocao.ParticipaPromocaos.Count.ToString()) %>
                    </td>
                    <td align="center">
                           <%=  Html.ActionLink(item.Usuario.Login, "Details", "Usuario", new { id = item.IdUsuario }, null)%>
                    </td>
                </tr>
         <% } %>
        </table>
<br />